/*
 * SqlCheck.h
 *
 *  Created on: Jul 10, 2024
 *      Author: root
 */

#ifndef BSP_SQL_SQLCHECK_H_
#define BSP_SQL_SQLCHECK_H_
#include "basic_header.h"

class SqlCheck {
public:
	static bool CheckParamter(std::string &param) {
		std::string key[15] = { "and", "*", "=", " ", "%0a", "%", "/", "union",
				"|", "&", "^", "#", "/*", "*/", "," };
		for (int i = 0; i < 15; i++) {
			if (param.find(key[i]) != std::string::npos) {
				return false;
			}
		}
		return true;
	}

	static bool CheckParamter(const char *str) {
		std::string s = str;
		return CheckParamter(s);
	}
};

#endif /* BSP_SQL_SQLCHECK_H_ */
